var express = require('express');
var router = express.Router();

var newsModel = require('../models/newsModel');
var LoginBean = require('../jsBean/LoginBean');


router.all('/', function(req, res, next) {
	var loginbean = req.session.loginbean;
	newsModel.newsContent(req, res, loginbean);
});

router.post('/comment', function(req, res, next) {
	var loginbean = req.session.loginbean;
	newsModel.newsComment(req, res, loginbean);
});

router.post('/commentOneTwo', function(req, res, next) {
	var loginbean = req.session.loginbean;
	newsModel.newsCommentOneTwo(req, res, loginbean);
});


module.exports = router;